window.onload = () => {
  const allBtn = document.querySelector(".all")
  const cancelBtn = document.querySelector(".cancel")
  const toggleBtn = document.querySelector(".toggle")


  const lists = document.querySelectorAll("input[type='checkbox']")

  allBtn.onclick = () => {
    lists.forEach(item => {
      item.checked = true
    })
  }

  cancelBtn.onclick = () => {
    lists.forEach(item => {
      item.checked = false
    })
  }

  toggleBtn.onclick = () => {
    lists.forEach(item => {
      item.checked = !item.checked
    })
  }
}

